﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.Model;
using System.Data;

namespace AspNetCs.IDAL
{
    public interface IFindFamily
    {
        /// <summary>
        /// 添加寻亲消息
        /// </summary>
        int AddFamilyInfo(FindFamilyModel model);

        /// <summary>
        /// 删除寻亲信息(逻辑删除)
        /// </summary>
        /// <param name="id"></param>
        int HiddenFamilyInfo(int id);

        /// <summary>
        /// 删除寻亲信息(物理删除)
        /// </summary>
        /// <param name="id"></param>
        int DeleteFamilyInfo(int id);

        /// <summary>
        /// 查询用户添加的寻亲信息
        /// </summary>
        /// <param name="CreateId">创建者Id</param>
        /// <param name="CheckedOrNo">查看未审核通过(0)、审核通过(1)、所有的(2)</param>
        /// <param name="QueryPropertys">需要查询的字段如 Id,Name,如需查询所有的字段输入</param> 
        /// <returns></returns>
        DataTable SearchUserCreateFamilyInfo(string QueryPropertys, int CreateId, int CheckedOrNo);

        /// <summary>
        /// 修改寻亲信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int UpdateFamilyInfo(FindFamilyModel model);

        /// <summary>
        /// 通过ID查询寻亲信息
        /// <param name="QueryPropertys">需要查询的字段如 Id,Name,如需查询所有的字段输入</param> 
        /// <param name="CheckedOrNo">编号</param>
        /// <returns></returns>
        DataTable SearchFamilyInfoById(string QueryPropertys, int Id);

        List<FindFamilyModel> GetList(string filter);

        /// <summary>
        /// 设置推荐或者取消推荐
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="CancleOrIntro">1表示设置推荐 0表示取消推荐</param>
        /// <returns></returns>
        int SetIntro(int Id, int CancleOrIntro);


        /// <summary>
        /// 审核或者取消审核
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="CancleOrIntro">1表示审核 0表示取消审核</param>
        /// <returns></returns>
        int SetCheck(int Id, int CancleOrIntro);


        /// <summary>
        /// 设置背景音乐
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="MusicId"></param>
        /// <returns></returns>
        int SetMusic(int Id, int MusicId);


        /// <summary>
        /// 字段更新
        /// </summary>
        /// <param name="Upfilter">不需要加“Set”关键字，更新的字段及值,不能为空值</param>
        /// <param name="filter">条件</param>
        void filterUpdate(string Upfilter, string filter);
        FindFamilyModel GetModel(DataRow dr);
    }
}
